<template>
  <section class="admin__warp">
    <header class="header__warp">
      <admin-header />
    </header>
    <div class="session__warp">
      <admin-navigation />
      <div class="content__warp">
        <Nuxt />
      </div>
    </div>
  </section>
</template>

<script>
import adminNavigation from "~/components/layouts/admin/admin_navigation";
export default {
  components: {
    [adminNavigation.name]: adminNavigation,
  },
  mounted() {
    try {
      if (!this.$store.getters.getToken) {
        this.$router.replace({
          path: "/admin/login",
        });
      }
    } catch (error) {}
  },
};
</script>

<style lang="scss" scoped>
.admin__warp {
  height: 100vh;
  overflow: hidden;
  .header__warp {
    height: 60px;
    background-color: #333333;
  }
  .session__warp {
    width: 100%;
    height: calc(100vh - 60px);
    display: flex;
    .navigation {
      width: 210px;
      height: 100%;
      flex-shrink: 0;
      background-color: #333333;
    }
    .content__warp {
      flex: 1;
      padding: 30px;
      box-sizing: border-box;
      height: 100%;
      overflow: auto;
    }
  }
}
</style>